package itqf.service;



import itqf.dao.AdminDaoImpl;
import itqf.dao.impl.AdminDao;
import itqf.entity.Users;
import itqf.service.impl.AdminService;

import java.util.List;

/**
 * com.itqf.service
 * 2020/9/18
 */
public class AdminServiceImpl implements AdminService {
    private AdminDao adminDao = new AdminDaoImpl();
    @Override
    public Users findUser(String username, String upassword) {
        Users user = adminDao.findUser(username, upassword);
        return user;
    }

    @Override
    public List<Users> findUserByStatus(int status) {
        return adminDao.findUserByStatus(status);

    }

    @Override
    public List<Users> searchUser(String username,String sex) {
        if(username==""){
            return adminDao.searchUser(username,sex);
        }else
        return adminDao.searchUser(username,sex);
    }

    @Override
    public int delete(int id) {
        return adminDao.delete(id);
    }
}
